<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>校园二手书市场管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
    <link rel="stylesheet" th:href="@{./css/font.css}">
    <link rel="stylesheet" th:href="@{./css/xadmin.css}">
    <link rel="stylesheet" th:href="@{https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.min.css}">
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js}"></script>
    <script th:src="@{./lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{./js/xadmin.js}"></script>
    <style>
        .layui-form-label {
            width: 180px;
        }
        .layui-form-item .layui-input-inline {
            width: 50%;
        }
        img[src=""],img:not([src]){
            opacity:0;
        }
    </style>

</head>
<body>
    <!--引入顶部-->
    <div th:insert="~{commons/commons::mytopbar}"></div>


    <!-- 中部开始 -->
    <div class="wrapper">
        <!-- 左侧菜单开始 -->
        <div class="left-nav">
            <div id="side-nav">
                <!--引入中间-->
<!--                <div th:insert="~{commons/commons::mymidul}"></div>-->
                <!-- 中部左侧菜单开始 -->
                <ul id="nav">
                    <li class="list" current>
                        <a href="./index.html">
                            <i class="iconfont">&#xe761;</i>
                            首页
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="iconfont">&#xe70b;</i>
                            管理员管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu">
                            <li th:class="current">
                                <a th:href="@{/Administratorlist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    管理员信息列表
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list">
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            用户管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu">
                            <li th:class="current">
                                <a th:href="@{/BackUserInfolist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    查看用户信息
                                </a>
                            </li>

                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            图书管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu">
                            <!--            <ul th:class="${page=='Booklist.html'?'current opened':'current'}">-->
                            <li th:class="current">
                                <a th:href="@{/Booklist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    图书信息列表
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            图书分类图标管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu">
                            <li th:class="current">
                                <a th:href="@{/Categoryicongonglist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    修改分类图标/名字
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            订单管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu opened">
                            <li th:class="current">
                                <!--                     <a th:href="@{/Orderslist}" th:class="${active=='dingdanguianli'?'nav-link active':'active'}">-->
                                <a th:href="@{/Orderslist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    订单信息列表
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            轮播图管理
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu">
                            <li th:class="current">
                                <a th:href="@{/swiperdataback}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    修改轮播图
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            意见反馈查看
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu" style="display:none">
                            <li th:class="current">
                                <a th:href="@{/wxfeedbacklist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    用户反馈信息
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            评论查看
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu" >
                            <li th:class="current">
                                <a th:href="@{/Commentlist}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    评论信息
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="list" >
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe60c;</i>
                            上传图片
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        <ul class="sub-menu" >
                            <li th:class="current">
                                <a th:href="@{/myuploadfile.html}">
                                    <i class="iconfont">&#xe6a7;</i>
                                    上传图片
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
                <!-- 中部左侧菜单结束 -->

            </div>
        </div>
        <!-- 左侧菜单结束 -->
        <!-- 右侧主体开始 -->
        <div class="page-content">
            <div class="content">
                <!-- 右侧内容框架，更改从这里开始 -->
                <!-- 中部开始 -->
                <div class="wrapper">
                    <!-- 右侧主体开始 -->
                    <div class="page-content">
                        <div class="content">

                            <!-- 右侧内容框架，更改从这里开始 -->
                            <form class="layui-form"  th:action="@{/Ordersaddtijiao}" method="post">
                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>卖方openid
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="openid" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>String类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>买方openidbuy
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="openidbuy" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>String类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>地址consignee_addr
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="consignee_addr" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>String类型
                                    </div>
                                </div>


                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>订单价格order_price
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="order_price" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>商品goods_id
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="goods_id" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>商品数量goods_number
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="goods_number" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>商品价格goods_price
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="goods_price" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>订单状态order_status
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="order_status" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型[0-4]
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>商品名称goods_name
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="goods_name" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>String类型
                                    </div>
                                </div>

<!--                                <div class="layui-form-item">-->
<!--                                    <label  class="layui-form-label">-->
<!--                                        <span class="x-red">*</span>订单编号order_number-->
<!--                                    </label>-->
<!--                                    <div class="layui-input-inline">-->
<!--                                        <input type="text"  name="order_number" required=""-->
<!--                                               autocomplete="off" class="layui-input">-->
<!--                                    </div>-->
<!--                                    <div class="layui-form-mid layui-word-aux">-->
<!--                                        <span class="x-red">*</span>Integer类型-->
<!--                                    </div>-->
<!--                                </div>-->

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>买家状态buyer
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="buyer" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>卖家状态seller
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="seller" required=""
                                               autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>Integer类型
                                    </div>
                                </div>

                                <!--图片上传-->
                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>上传图片
                                    </label>
                                    <div class="layui-form-mid layui-word-aux">
                                        <a href="javascript:void(0)" onclick="uploadPhoto()" class="layui-btn">选择图片</a>
                                        <input type="file" id="photoFile" style="display: none;" onchange="upload()">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>图片预览
                                    </label>
                                    <div class="layui-form-mid layui-word-aux">
                                        <img id="preview_photo" src=""  class="layui-layer-phimg" style="height: 150px;width: 150px">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                        <span class="x-red">*</span>图片地址goods_small_logo
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text"  name="goods_small_logo" required=""
                                               autocomplete="off" class="layui-input" value="" id="myvalue">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">
                                        <span class="x-red">*</span>String类型
                                    </div>
                                </div>

<!--                                <div class="layui-form-item">-->
<!--                                    <label  class="layui-form-label">-->
<!--                                        <span class="x-red">*</span>图片地址goods_small_logo-->
<!--                                    </label>-->
<!--                                    <div class="layui-input-inline">-->
<!--                                        <input type="text"  name="goods_small_logo" required=""-->
<!--                                               autocomplete="off" class="layui-input">-->
<!--                                    </div>-->
<!--                                    <div class="layui-form-mid layui-word-aux">-->
<!--                                        <span class="x-red">*</span>String类型-->
<!--                                    </div>-->
<!--                                </div>-->


                                <div class="layui-form-item">
                                    <label  class="layui-form-label">
                                    </label>
                                    <button  class="layui-btn" lay-filter="add" lay-submit="" type="submit">
                                        增加
                                    </button>
                                    <a class="layui-btn" th:href="@{/Orderslist}">
                                        <i class="layui-icon">&#xe60c;</i>返回
                                    </a>
                                </div>

                            </form>
                            <!-- 右侧内容框架，更改从这里结束 -->
                        </div>
                    </div>
                    <!-- 右侧主体结束 -->
                </div>
                <!-- 中部结束 -->
                <!-- 右侧内容框架，更改从这里结束 -->
            </div>
        </div>
        <!-- 右侧主体结束 -->
    </div>
    <!-- 中部结束 -->

    <!--引入底部-->
    <div th:insert="~{commons/commons::mybottom}"></div>
    <!--引入背景-->
    <div th:insert="~{commons/commons::mybackground}"></div>

    <script src="http://cdn.bootcss.com/echarts/3.3.2/echarts.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/echarts-for-x-admin.js"></script>

    <!--处理上传图片-->
    <script>
        function uploadPhoto() {
            $("#photoFile").click();
        }
        function upload() {
            if ($("#photoFile").val() == '') {
                return;
            }
            var formData = new FormData();
            formData.append('file', document.getElementById('photoFile').files[0]);
            $.ajax({
                // url:"${pageContext.request.contextPath}/fileUpload",
                url:"/fileUpload",
                type:"post",
                data: formData,
                contentType: false,
                processData: false,
                success: function(data) {
                    $("#preview_photo").attr("src", data.filename);
                    $("#myvalue").attr("value",data.filename)
                },
                error:function(data) {
                    alert("上传失败")
                }
            });
        }
    </script>
</body>
</html>